package cn.tedu.csmall.product.webapi.controller;

import cn.tedu.csmall.pojo.entity.Goods;
import cn.tedu.csmall.pojo.entity.PmsSpu;
import cn.tedu.csmall.product.webapi.service.IGoodsService;
import cn.tedu.csmall.product.webapi.service.IGoodsService1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/spu")
public class SpuController {

    @Autowired
    private IGoodsService1 goodsService1;

    @GetMapping("/goods")
    public List<Goods> findGoods(PmsSpu pmsSpu){
        return goodsService1.findGoods(pmsSpu);
    }
 }
